package com.example.shop_2304.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface CommentDao {
    //新增
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(comment: Comment)

    //查询
    @Query("select * from comment")
    fun query():MutableList<Comment>

    //删除
    @Delete
    fun delete(comment: Comment)
}